<script setup>
    import { ref,onMounted } from 'vue'
    const count = ref(0)
    function increment() {
        count.value++
    }
    onMounted(() => {
        console.log('组件挂载完成')
    })
</script>
<template>
    <button @click="increment">{{ count }}</button>
</template>